package net.akkz.dbFactory;

import java.sql.SQLException;
import java.util.ArrayList;

import net.akkz.exception.BuildClassError;
import net.akkz.exception.SQLExcuteException;

public interface Session
{
	public void excute(String sql, String[] values) throws SQLExcuteException;
	
	public void excute(String sql) throws SQLExcuteException, SQLException;
	
	public <T> T get(String sql, String[] values, Class<T> clazz) throws SQLExcuteException, BuildClassError;
	
	public <T> T get(String sql, int id, Class<T> clazz) throws SQLExcuteException, BuildClassError;
	
	public String get(String sql, String id) throws SQLExcuteException, BuildClassError;
	
	public <T> ArrayList<T> find(String sql, String[] values, Class<T> clazz) throws SQLExcuteException, BuildClassError;
	
	public <T> ArrayList<T> find(String sql, String[] values, Class<T> clazz, int start, int length) throws SQLExcuteException, BuildClassError;
	
	public boolean check(String sql, String[] values) throws SQLExcuteException;

	public void commit();

	public void rollback();
	
	public void close() throws SQLExcuteException;
}
